package org.intellij.lang.assembly.parsing;

import com.intellij.lexer.FlexLexer;
import com.intellij.psi.tree.IElementType;
import org.intellij.lang.assembly.highlighter.AssemblyTokenTypes;

%%

%class _AssemblyLexer
%implements FlexLexer
%final
%ignorecase
%unicode
%function advance
%type IElementType
%eof{ return;
%eof}

WhiteSpace = [ \t]
LineTerminator = \r|\n|\r\n
InputCharacter = [^\r\n]
EndOfLineComment=(";")[^\r\n]*

%%

<YYINITIAL> "END"               { return AssemblyTokenTypes.END_KEYWORD; }
<YYINITIAL> "ENDS"              { return AssemblyTokenTypes.ENDS_KEYWORD; }
<YYINITIAL> "segment"           { return AssemblyTokenTypes.SEGMENT_KEYWORD; }
<YYINITIAL> "ASSUME"            { return AssemblyTokenTypes.ASSUME_KEYWORD; }
<YYINITIAL> "MOV"               { return AssemblyTokenTypes.MOV_KEYWORD; }
